3.417 \(\int \frac{\cot ^4(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=82 \[ \frac{\cot ^3(c+d x)}{3 a d}+\frac{\tanh ^{-1}(\cos (c+d x))}{8 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{4 a d}+\frac{\cot (c+d x) \csc (c+d x)}{8 a d} \]

[Out]

ArcTanh[Cos[c + d*x]]/(8*a*d) + Cot[c + d*x]^3/(3*a*d) + (Cot[c + d*x]*Csc[c + d*x])/(8*a*d) - (Cot[c + d*x]*C
sc[c + d*x]^3)/(4*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.147818, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2839, 2611, 3768, 3770, 2607, 30} \[ \frac{\cot ^3(c+d x)}{3 a d}+\frac{\tanh ^{-1}(\cos (c+d x))}{8 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{4 a d}+\frac{\cot (c+d x) \csc (c+d x)}{8 a d} \]

Antiderivative was successfully verified.

[In]

Int[(Cot[c + d*x]^4*Csc[c + d*x])/(a + a*Sin[c + d*x]),x]

[Out]

ArcTanh[Cos[c + d*x]]/(8*a*d) + Cot[c + d*x]^3/(3*a*d) + (Cot[c + d*x]*Csc[c + d*x])/(8*a*d) - (Cot[c + d*x]*C
sc[c + d*x]^3)/(4*a*d)

Rule 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\cot ^4(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac{\int \cot ^2(c+d x) \csc ^2(c+d x) \, dx}{a}+\frac{\int \cot ^2(c+d x) \csc ^3(c+d x) \, dx}{a}\\ &=-\frac{\cot (c+d x) \csc ^3(c+d x)}{4 a d}-\frac{\int \csc ^3(c+d x) \, dx}{4 a}-\frac{\operatorname{Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{a d}\\ &=\frac{\cot ^3(c+d x)}{3 a d}+\frac{\cot (c+d x) \csc (c+d x)}{8 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{4 a d}-\frac{\int \csc (c+d x) \, dx}{8 a}\\ &=\frac{\tanh ^{-1}(\cos (c+d x))}{8 a d}+\frac{\cot ^3(c+d x)}{3 a d}+\frac{\cot (c+d x) \csc (c+d x)}{8 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{4 a d}\\ \end{align*}

Mathematica [A]  time = 1.12517, size = 125, normalized size = 1.52 \[ \frac{\csc ^4(c+d x) \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^2 \left (-42 \cos (c+d x)+2 (8 \sin (c+d x)-3) \cos (3 (c+d x))+24 \left (\sin (2 (c+d x))+\sin ^4(c+d x) \left (\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )\right )\right )\right )}{192 a d (\sin (c+d x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cot[c + d*x]^4*Csc[c + d*x])/(a + a*Sin[c + d*x]),x]

[Out]

(Csc[c + d*x]^4*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2*(-42*Cos[c + d*x] + 2*Cos[3*(c + d*x)]*(-3 + 8*Sin[c +
 d*x]) + 24*((Log[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]])*Sin[c + d*x]^4 + Sin[2*(c + d*x)])))/(192*a*d*(1
+ Sin[c + d*x]))

________________________________________________________________________________________

Maple [A]  time = 0.128, size = 132, normalized size = 1.6 \begin{align*}{\frac{1}{64\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{4}}-{\frac{1}{24\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}+{\frac{1}{8\,da}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{1}{8\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}}-{\frac{1}{64\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-4}}-{\frac{1}{8\,da}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) }+{\frac{1}{24\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*csc(d*x+c)^5/(a+a*sin(d*x+c)),x)

[Out]

1/64/d/a*tan(1/2*d*x+1/2*c)^4-1/24/d/a*tan(1/2*d*x+1/2*c)^3+1/8/d/a*tan(1/2*d*x+1/2*c)-1/8/d/a/tan(1/2*d*x+1/2
*c)-1/64/d/a/tan(1/2*d*x+1/2*c)^4-1/8/d/a*ln(tan(1/2*d*x+1/2*c))+1/24/d/a/tan(1/2*d*x+1/2*c)^3

________________________________________________________________________________________

Maxima [B]  time = 1.12598, size = 208, normalized size = 2.54 \begin{align*} \frac{\frac{\frac{24 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{8 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{3 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}}{a} - \frac{24 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac{{\left (\frac{8 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{24 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - 3\right )}{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}{a \sin \left (d x + c\right )^{4}}}{192 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^5/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/192*((24*sin(d*x + c)/(cos(d*x + c) + 1) - 8*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*sin(d*x + c)^4/(cos(d*x
 + c) + 1)^4)/a - 24*log(sin(d*x + c)/(cos(d*x + c) + 1))/a + (8*sin(d*x + c)/(cos(d*x + c) + 1) - 24*sin(d*x
+ c)^3/(cos(d*x + c) + 1)^3 - 3)*(cos(d*x + c) + 1)^4/(a*sin(d*x + c)^4))/d

________________________________________________________________________________________

Fricas [A]  time = 1.10376, size = 365, normalized size = 4.45 \begin{align*} \frac{16 \, \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 6 \, \cos \left (d x + c\right )^{3} + 3 \,{\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 3 \,{\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 6 \, \cos \left (d x + c\right )}{48 \,{\left (a d \cos \left (d x + c\right )^{4} - 2 \, a d \cos \left (d x + c\right )^{2} + a d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^5/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/48*(16*cos(d*x + c)^3*sin(d*x + c) - 6*cos(d*x + c)^3 + 3*(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)*log(1/2*co
s(d*x + c) + 1/2) - 3*(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)*log(-1/2*cos(d*x + c) + 1/2) - 6*cos(d*x + c))/(
a*d*cos(d*x + c)^4 - 2*a*d*cos(d*x + c)^2 + a*d)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*csc(d*x+c)**5/(a+a*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.37647, size = 174, normalized size = 2.12 \begin{align*} -\frac{\frac{24 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right )}{a} - \frac{3 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 8 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 24 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{4}} - \frac{50 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 24 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 8 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 3}{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4}}}{192 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^5/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/192*(24*log(abs(tan(1/2*d*x + 1/2*c)))/a - (3*a^3*tan(1/2*d*x + 1/2*c)^4 - 8*a^3*tan(1/2*d*x + 1/2*c)^3 + 2
4*a^3*tan(1/2*d*x + 1/2*c))/a^4 - (50*tan(1/2*d*x + 1/2*c)^4 - 24*tan(1/2*d*x + 1/2*c)^3 + 8*tan(1/2*d*x + 1/2
*c) - 3)/(a*tan(1/2*d*x + 1/2*c)^4))/d